<template>
  <div class="byptfw">
    <div class="space-around bdb pb20 pt20">
      <div class="flex align-center">
        <img
          class="image"
          :src="imgUrl + '/profile/personinfo/2023/9/22/交易查询_3fe816350d4948cea245e44f542105a5.png'"
        />
        <div class="ml10 tac">
          <div class="fs18 bold">{{ parseFloat(dataInfo.monthTrade).toFixed(2) || 0 }}</div>
          <div class="fs12 mt10">本月交易额</div>
        </div>
      </div>
      <div class="flex align-center">
        <img class="image" :src="imgUrl + '/profile/personinfo/2023/9/22/贷款_b17bc9b30743442b8a960a5eac2ae252.png'" />
        <div class="ml10 tac">
          <div class="fs18 bold">{{ parseFloat(dataInfo.monthLoan).toFixed(2) || 0 }}</div>
          <div class="fs12 mt10">本月贷款额</div>
        </div>
      </div>
    </div>
    <div class="space-around mt40">
      <div class="tac text-overflow">
        <div class="fs18 bold">{{ parseFloat(dataInfo.monthOrder).toFixed(0) || 0 }}</div>
        <div class="fs12">本月交易订单</div>
      </div>
      <div class="tac text-overflow">
        <div class="fs18 bold">{{ parseFloat(dataInfo.monthLoanNum).toFixed(0) || 0 }}</div>
        <div class="fs12">本月助农贷款</div>
      </div>
      <div class="tac text-overflow">
        <div class="fs18 bold">{{ parseFloat(dataInfo.dayOrder).toFixed(0) || 0 }}</div>
        <div class="fs12">今日订单数</div>
      </div>
      <div class="tac text-overflow">
        <div class="fs18 bold">{{ parseFloat(dataInfo.dayOrderMoney).toFixed(2) || 0 }}</div>
        <div class="fs12">今日订单额</div>
      </div>
    </div>
  </div>
</template>

<script>
import { getMonthData } from '@/api/index'

export default {
  name: 'Byptfw',
  data() {
    return {
      imgUrl: process.env.VUE_APP_IMG_API,
      dataInfo: []
    }
  },
  created() {
    this.getData()
  },
  methods: {
    getData() {
      getMonthData().then((res) => {
        this.dataInfo = res.data
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.byptfw {
  height: 213px;
}
.image {
  height: 60px;
  width: 60px;
}
</style>
